import request from './request1'

// const ApiRootUrl = 'http://testh5dfcshop.dfcshop.com/apis/dfcapi/api/2.0/'
  //  const ApiRootUrl = 'https://testapi.dfcshop.com/dfcapi/api/2.0/'
const ApiRootUrl = 'https://api.dfcshop.com:8117/dfcapi/api/2.0/'

const api = {
  // 首页数据接口
  // getIndexData: (r) => request.get('buyer/HomePage', null, {
  //   baseURL: ApiRootUrl
  // }),
  // 分类目录全部分类数据接口
  getCatalogList: (r) => request.get('catalog/index', null, {
    baseURL: ApiRootUrl
  }),
  // 分类目录当前分类数据接口
  getCatalogCurrent: (paramObj) => request.get('catalog/current', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 使用util的request方法，字符串变量即可
  // 微信登录
  AuthLoginByWeixin: ApiRootUrl + 'auth/loginByWeixin',
  // 获取微信统一下单prepay_id
  PayPrepayId: ApiRootUrl + 'pay/prepay',
  // （pay单独使用）获取微信统一下单prepay_id
  PayPrepayIdFunc: (paramObj) => request.get('pay/prepay', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 统计商品总数
  getGoodsCount: (r) => request.get('goods/count', null, {
    baseURL: ApiRootUrl
  }),
  // 获得分类商品列表,条件比较复杂用paramObj接收
  getGoodsList: (paramObj) => request.get('goods/list', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 获得分类数据
  getGoodsCategory: (paramObj) => request.get('goods/category', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 获得商品的详情
  getGoodsDetail: (paramObj) => request.get('goods/detail', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 新品
  getGoodsNew: (r) => request.get('goods/new', null, {
    baseURL: ApiRootUrl
  }),
  // 热门
  getGoodsHot: (r) => request.get('goods/hot', null, {
    baseURL: ApiRootUrl
  }),
  // 商品详情页的关联商品（大家都在看）
  getGoodsRelated: (paramObj) => request.get('goods/related', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 品牌列表
  getBrandList: (paramObj) => request.get('brand/list', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 品牌详情
  getBrandDetail: (paramObj) => request.get('brand/detail', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 获取购物车的数据
  getCartList: (r) => request.get('cart/index', null, {
    baseURL: ApiRootUrl
  }),
  // 添加商品到购物车
  CartAdd: (paramObj) => request.post('cart/add', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 更新购物车的商品
  CartUpdate: (paramObj) => request.post('cart/update', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 删除购物车的商品
  CartDelete: (paramObj) => request.post('cart/delete', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 选择或取消选择商品
  CartChecked: (paramObj) => request.post('cart/checked', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 获取购物车商品件数
  getCartGoodsCount: (r) => request.get('cart/goodscount', null, {
    baseURL: ApiRootUrl
  }),
  // 下单前信息确认
  CartCheckout: (paramObj) => request.get('cart/checkout', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 提交订单
  OrderSubmit: (paramObj) => request.post('order/submit', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 收藏列表
  getCollectList: (paramObj) => request.get('collect/list', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 添加或取消收藏
  CollectAddOrDelete: (paramObj) => request.post('collect/addordelete', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 评论列表
  getCommentList: (paramObj) => request.get('comment/list', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 评论总数
  getCommentCount: (paramObj) => request.get('comment/count', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 发表评论
  CommentPost: (paramObj) => request.post('comment/post', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 专题列表
  getTopicList: (paramObj) => request.get('topic/list', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 专题详情
  getTopicDetail: (paramObj) => request.get('topic/detail', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 相关专题
  TopicRelated: (paramObj) => request.get('topic/related', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 搜索页面数据
  SearchIndex: (r) => request.get('search/index', null, {
    baseURL: ApiRootUrl
  }),
  // 搜索数据
  SearchResult: (r) => request.get('search/result', null, {
    baseURL: ApiRootUrl
  }),
  // 搜索帮助
  SearchHelper: (paramObj) => request.get('search/helper', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 清空搜索历史记录
  ClearSearchHistory: (r) => request.post('search/clearhistory', null, {
    baseURL: ApiRootUrl
  }),
  // 收货地址列表
  getAddressList: (r) => request.get('address/list', null, {
    baseURL: ApiRootUrl
  }),
  // 收货地址详情
  getAddressDetail: (paramObj) => request.get('address/detail', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 保存收货地址
  AddressSave: (paramObj) => request.post('address/save', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 删除收获地址
  AddressDelete: (paramObj) => request.post('address/delete', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 获取区域列表
  getRegionList: (paramObj) => request.get('region/list', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 订单列表
  getOrderList: (r) => request.get('order/list', null, {
    baseURL: ApiRootUrl
  }),
  // 订单详情
  getOrderDetail: (paramObj) => request.get('order/detail', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 取消订单
  OrderCancel: (r) => request.get('order/cancel', null, {
    baseURL: ApiRootUrl
  }),
  // 物流详情
  getOrderExpress: (paramObj) => request.post('order/express', paramObj, {
    baseURL: ApiRootUrl
  }),
  // 足迹列表
  getFootprintList: (r) => request.get('footprint/list', null, {
    baseURL: ApiRootUrl
  }),
  // 删除足迹
  FootprintDelete: (paramObj) => request.post('footprint/delete', paramObj, {
    baseURL: ApiRootUrl
  }),

    // 精选宝贝
  NiceProduct: (paramObj) => request.post('buyer/NiceProduct', paramObj, {
      baseURL: ApiRootUrl,
    }),

    // 商品详情页面
  ProductDetail: (paramObj) => request.post('product/ProductDetail', paramObj, {
      baseURL: ApiRootUrl,
    }),
      // 地址列表
      getAddressList: (paramObj) => request.post('user/AddressList', paramObj, {
        baseURL: ApiRootUrl,
      }),
    // 新增地址
  AddressAdd: (paramObj) => request.post('user/AddressAdd', paramObj, {
      baseURL: ApiRootUrl,
    }),
      // 删除地址
  AddressDel: (paramObj) => request.post('user/AddressDel', paramObj, {
    baseURL: ApiRootUrl,
  }),
    // 默认地址
  AddressDefault: (paramObj) => request.post('user/AddressDefault', paramObj, {
      baseURL: ApiRootUrl,
    }),
      // 更新编辑地址
  AddressMod: (paramObj) => request.post('user/AddressMod', paramObj, {
    baseURL: ApiRootUrl,
  }),
  // 提交订单
  BuyerOrderAdd: (paramObj) => request.post('order/BuyerOrderAdd', paramObj, {
    baseURL: ApiRootUrl,
  }),
  // 获取OpenId
  getOpenId: (paramObj) => request.post('user/getOpenId', paramObj, {
    baseURL: ApiRootUrl,
  }),
   // 收藏商品
   AddFollowProduct: (paramObj) => request.post('follow/AddFollowProduct', paramObj, {
    baseURL: ApiRootUrl,
  }),
  //判断是否收藏
  HaveFollowProduct: (paramObj) => request.post('follow/HaveFollowProduct', paramObj, {
    baseURL: ApiRootUrl,
  }),
  //取消收藏
  DelFollowProduct: (paramObj) => request.post('follow/DelFollowProduct', paramObj, {
      baseURL: ApiRootUrl,
    }),
  // 分类
  CategoryList: (paramObj) => request.post('buyer/CategoryList', paramObj, {
      baseURL: ApiRootUrl,
    }),  
     // 话题
  getQuestionList: (paramObj) => request.post('question/getQuestionList', paramObj, {
    baseURL: ApiRootUrl,
  }),  
  // 搜索
  QueryProductList: (paramObj) => request.post('buyer/QueryProductList', paramObj, {
    baseURL: ApiRootUrl,
  }),  
  // 获取openid
  getOpenId: (paramObj) => request.post('user/getOpenId', paramObj, {
    baseURL: ApiRootUrl,
  }),  
   // 微信支付
   BuyerOrderPay: (paramObj) => request.post('order/BuyerOrderPay', paramObj, {
    baseURL: ApiRootUrl,
  }),  
  // 获取验证码
  GetVerSmsCode: (paramObj) => request.post('user/GetVerSmsCode', paramObj, {
    baseURL: ApiRootUrl,
  }),  
  // 手机号登入
  SmsLogin: (paramObj) => request.post('user/SmsLogin', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  // 店铺首页
  GetHomePage: (paramObj) => request.post('store/HomePage', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  // 店铺全部商品
  AllProductList: (paramObj) => request.post('store/AllProductList', paramObj, {
    baseURL: ApiRootUrl,
  }), 
   // 判断是否关注商家
   HaveFollowStore: (paramObj) => request.post('follow/HaveFollowStore', paramObj, {
    baseURL: ApiRootUrl,
  }), 
   // 关注商家
   AddFollowStore: (paramObj) => request.post('follow/AddFollowStore', paramObj, {
    baseURL: ApiRootUrl,
  }), 
   // 取消关注商家
   DelFollowStore: (paramObj) => request.post('follow/DelFollowStore', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  //  首页
  getHomePage: (r) => request.get('buyer/HomePage', null, {
    baseURL: ApiRootUrl
  }),

 //  订 单 列 表
 BuyerOrderList: (paramObj) => request.post('order/BuyerOrderList', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  // 获取订单付款信息
  BuyerOrderPayInfo: (paramObj) => request.post('order/BuyerOrderPayInfo', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  // 取消订单
  BuyerOrderCancel: (paramObj) => request.post('order/BuyerOrderCancel', paramObj, {
    baseURL: ApiRootUrl,
  }), 
    // 删除订单
  BuyerOrderDel: (paramObj) => request.post('order/BuyerOrderDel', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  
  // 确实收货
  BuyerOrderReceipt: (paramObj) => request.post('order/BuyerOrderReceipt', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  // 订单详情
  BuyerOrderDetail: (paramObj) => request.post('order/BuyerOrderDetail', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  // 收藏、关注。足迹
  FollowTotalInfo: (paramObj) => request.post('follow/MyFollowTotalInfo', paramObj, {
    baseURL: ApiRootUrl,
  }),  

  // 关注的厂家列表
  FollowStoreList: (paramObj) => request.post('follow/FollowStoreList', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  
  // 收藏宝贝
  FollowProductList: (paramObj) => request.post('follow/FollowProductList', paramObj, {
      baseURL: ApiRootUrl,
    }), 
  // 足迹
      FootProductList: (paramObj) => request.post('follow/FootProductList', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  FootProductList: (paramObj) => request.post('follow/FootProductList', paramObj, {
    baseURL: ApiRootUrl,
  }),
    // 天天换新
    DayDayProduct: (paramObj) => request.post('buyer/DayDayProduct', paramObj, {
      baseURL: ApiRootUrl,
    }),  
   // 精选品牌
   getFeaturedBrandMore: (paramObj) => request.post('buyer/getFeaturedBrandMore', paramObj, {
    baseURL: ApiRootUrl,
  }),    
   // 每日好厂
   getFeaturedStoreMore: (paramObj) => request.post('buyer/getFeaturedStoreMore', paramObj, {
    baseURL: ApiRootUrl,
  }),  
                                       // 活动列表 
  // 乒乓馆&潮流馆 //本周最大牌
  BestOnWeek: (paramObj) => request.post('buyer/BestOnWeek', paramObj, {
    baseURL: ApiRootUrl,
  }),
  //本周最大牌大图
  BestOnWeekFirst: (paramObj) => request.post('buyer/BestOnWeekFirst', paramObj, {
    baseURL: ApiRootUrl,
  }),
  //今日我大牌
  BestToday: (paramObj) => request.post('buyer/BestToday', paramObj, {
    baseURL: ApiRootUrl,
  }),
  //今日我大牌更多
  BestTodayMore: (paramObj) => request.post('buyer/BestTodayMore', paramObj, {
    baseURL: ApiRootUrl,
  }),
  //今日我最爆
  getProductTodaye: (paramObj) => request.post('buyer/BestProductToday', paramObj, {
    baseURL: ApiRootUrl,
  }),
   //banner图
   BestBanner: (paramObj) => request.post('buyer/Banner', paramObj, {
    baseURL: ApiRootUrl,
  }),
   //聚爆款首页
   ImplosionList: (paramObj) => request.post('buyer/ImplosionList', paramObj, {
    baseURL: ApiRootUrl,
  }), 
   //童品汇商家列表
   TPStoreList: (paramObj) => request.post('buyer/TPStoreList', paramObj, {
    baseURL: ApiRootUrl,
  }), 
   //童品汇商品列表列表
   TPBestProduct: (paramObj) => request.post('buyer/TPBestProduct', paramObj, {
    baseURL: ApiRootUrl,
  }), 

  //尾品汇商家列表
  WPStoreList: (paramObj) => request.post('buyer/WPStoreList', paramObj, {
    baseURL: ApiRootUrl,
  }), 
    //尾品汇商品列表列表
    WPBestProduct: (paramObj) => request.post('buyer/WPBestProduct', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  //活动版块
  getSpecialActivityProduct: (paramObj) => request.post('activity/getSpecialActivityProduct', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  //活动版块
  getSpecialActivityBanner: (paramObj) => request.post('activity/getSpecialActivityBanner', paramObj, {
    baseURL: ApiRootUrl,
  }), 
   //密码登入
   UserLogin: (paramObj) => request.post('user/UserLogin', paramObj, {
    baseURL: ApiRootUrl,
  }), 
  
}

export default api
